package game.engine.network.cmd;

import json.JSONObject;
import entity.Context;
import game.engine.network.server.IControllerServer;

public abstract class CmdClient extends Command
{

	public abstract void execute( IControllerServer pController );

	public CmdClient(EnumCommand pIdCmd, Context pContext)
	{
		super( pIdCmd );
		addParam( KEY_USERCODE , pContext.getUserCode() );
		addParam( KEY_USERID , pContext.getUserId() );
	}

	protected CmdClient( JSONObject pObject)
	{
		super( pObject );
	}

	public Integer getUserId()
	{
		return (Integer)getParam(Command.KEY_USERID);// TODO
	}
	
	public String getUserCode()
	{
		return (String)getParam(Command.KEY_USERCODE);// TODO
	}

}
